import{u as d}from"./useLoading.js";import{y as t}from"./index.js";import{d as p,e as c,o as l,aa as g,P as m,Q as h,N as _,K as q,R as o,a2 as f,a5 as v}from"./elementPlusModules.js";const y=o("p",null,"队列 loading 仅适用于页面初始化, 生命周期存在与 mounted 中, 初始化完成后将卸载 hook 调用",-1),L={style:{"margin-top":"10px",height:"30vh","background-color":"rgba(0, 0, 0, 0.3)"}},B=p({__name:"Queue",setup(k){const{queueId:e,queueLoading:n}=d(),a=c(`
<template>
  <div v-loading="queueLoading" style="margin-top: 10px; height: 30vh; background-color: rgba(0, 0, 0, 0.3)"></div>
</template>

<script setup lang="ts">
import { onMounted } from "vue";

import useLoading from "../../../../../hooks/useLoading";

import http from "../../../../../api";

const { queueId, queueLoading } = useLoading();

/**
 * 任意的接口
 * 封装请求 api 时将队列 id 作为特殊参数传入 config 中
 */
const queryOptions = () => {
  return http.get("", {}, { queueId });
};

// 任意的接口获取
const queryData = () => {
  return http.get("", {}, { queueId });
};

// 初始化页面
onMounted(() => {
  queryOptions();
  queryData();
});
<\/script>
`),r=()=>t.get("",{},{queueId:e}),s=()=>t.get("",{},{queueId:e});return l(()=>{r(),s()}),(u,D)=>{const i=g("loading");return m(),h(v,null,[y,_(o("div",L,null,512),[[i,q(n)]]),f(u.$slots,"default",{html:a.value})],64)}}});export{B as _};
